package forums.dao;

import org.springframework.stereotype.Repository;
import org.springframework.util.Assert;

import forums.model.Message;

/*
 * Author       :       Willie Wheeler and John Wheeler
 * Book         :       'Spring In Practice' [Book written by Willie Wheeler and John Wheeler]
 */
@Repository
public class DummyMessageDao implements MessageDao {
	private ObjectFactory factory = ObjectFactory.instance();

	public Message readMessage(Long id) {
		Assert.notNull(id, "id required");
		return factory.createMessage(id);
	}
}
